package com.skirmisher.inspection.common.timeTask;

import com.skirmisher.inspection.common.service.SystemCodeCacheService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @ClassName InsCodeUpdateTime
 * @Description TODO
 * @Author hanwangxin
 * @Date 2020/12/10 下午9:47
 * @Version 1.0
 */
@Slf4j
@Component
public class InsCodeUpdateTimeTask {

    @Autowired
    private SystemCodeCacheService systemCodeCacheService;

    @Scheduled(cron = "0 0/10 * * * ? ")
    public void updateCode(){

        systemCodeCacheService.updateCache();
    }
}
